<div id="list">
<?php if (count($aluno_list)): ?>
<table class="paginacao" cellpadding="2" cellspacing="0" width="100%" align="center">
	<tr>
		<td align="left"><?php $pager_layout->displayResultados(); ?></td>
		<td align="right"><?php $pager_layout->display(array('nourl'=>true)); ?></td>
	</tr>
</table>
<?php endif; ?>

<table class="list">
	<thead>
    <tr>
	    <th><?php echo $form['id_aluno']->renderLabel() ?></th>
	    <th><?php echo $form['nm_aluno']->renderLabel() ?></th>
	    <th><?php echo $form['st_aluno']->renderLabel() ?></th>
	    <th><?php echo $form['id_item_sistema']->renderLabel() ?></th>
	    <th><?php echo $form['user_id']->renderLabel() ?></th>
	    <th><?php echo $form['slug']->renderLabel() ?></th>
	    <th><?php echo $form['created_at']->renderLabel() ?></th>
	    <th><?php echo $form['updated_at']->renderLabel() ?></th>
		<th>Ações</th>
    </tr>
	</thead>
  	<tbody>
  	<?php if (!count($aluno_list)): ?>
	<tr>
		<td align="center" colspan="9">NENHUM REGISTRO ENCONTRADO!</td>
	</tr>
	<?php endif; ?>
	<?php $i = 0; ?>
    <?php foreach ($aluno_list as $aluno): ?>
    <?php $bg = ($i++ % 2 == 0)? 'row0' : 'row1'; ?>
    <tr class="<?php echo $bg; ?>">
			    <td><a href="<?php echo url_for('aluno/show?id_aluno='.$aluno['id_aluno']) ?>"><?php echo $aluno['id_aluno'] ?></a></td>
				    <td><?php echo $aluno['nm_aluno'] ?></td>
			    <td><?php echo $aluno['st_aluno'] ?></td>
			    <td><?php echo $aluno['id_item_sistema'] ?></td>
			    <td><?php echo $aluno['user_id'] ?></td>
			    <td><?php echo $aluno['slug'] ?></td>
			    <td><?php echo $aluno['created_at'] ?></td>
			    <td><?php echo $aluno['updated_at'] ?></td>
			<td>
								<?php
            echo link_to(
                ' ',
                url_for('aluno/show?id_aluno='.$aluno['id_aluno']),
                array('class'=>'icoVisualizar','title'=>'Visualizar aluno')
            )
        ?>
            	<?php
            echo link_to(
                ' ',
                url_for('aluno/edit?id_aluno='.$aluno['id_aluno']),
                array('class'=>'icoEditar','title'=>'Editar aluno')
            )
        ?>
    	<?php
            echo link_to(
                ' ',
                url_for('aluno/delete?id_aluno='.$aluno['id_aluno']),
                array('class'=>'icoExcluir','title'=>'Excluir aluno', 'confirm' => 'Tem certeza que deseja Excluir?')
            )
        ?>
	</td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>
</div>